package com.example.app.feign.inter.service;

import com.example.app.feign.inter.entity.Person;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(value = "hello-service-provider") // 服务名不区分大小写 hello-service-provider和HELLO-SERVICE-PROVIDER都可以
public interface HelloServiceFeign {

	@RequestMapping(value = "/demo/getHost", method = RequestMethod.GET)
	public String getHost(String name);

	@RequestMapping(value = "/demo/postPerson", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
	public Person postPerson(String name);
}
